package org.neogenesis.web.model;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the GO_RELATION database table.
 * 
 */
@Embeddable
public class GoRelationPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="ID_SRC")
	private int idSrc;

	@Column(name="ID_DST")
	private int idDst;

    public GoRelationPK() {
    }
	public int getIdSrc() {
		return this.idSrc;
	}
	public void setIdSrc(int idSrc) {
		this.idSrc = idSrc;
	}
	public int getIdDst() {
		return this.idDst;
	}
	public void setIdDst(int idDst) {
		this.idDst = idDst;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof GoRelationPK)) {
			return false;
		}
		GoRelationPK castOther = (GoRelationPK)other;
		return 
			(this.idSrc == castOther.idSrc)
			&& (this.idDst == castOther.idDst);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.idSrc;
		hash = hash * prime + this.idDst;
		
		return hash;
    }
}